1. Technical Field
The present invention relates to an image processing method, an image processing apparatus and a recording medium for performing image processing for adjusting the gray levels of image data which are the basis of an image to express gray levels when forming the image.
2. Description of Related Art
Various types of image forming techniques, such as a thermal transfer, an electrophotographic or an inkjet technique, are used in image forming apparatuses such as copying machines or printers for forming images on a record carrier such as paper. With these image forming techniques, since it is almost impossible to express gray levels for each pixel unit, a halftone reproduction technique is used to locally change the ratio of colored pixels and thereby express the gray levels of an image. For example, when forming a gray level image with black and while binary values, the ratio of black pixels is increased in a deeper color area and the ratio of black pixels is decreased in a lighter color area, so that an image with color shading perceivable by the naked eye is formed. In image data created using a camera, an image processing program etc., the pixel values are expressed by gray levels. Therefore, in order to form an image based on the image data, it is necessary to perform image processing for converting the pixel values into values capable of realizing halftone reproduction.
Conventionally, various techniques have been developed as techniques for performing such image processing. The technique disclosed in Japanese Patent Application Laid-Open No. 2000-261669 uses a dithering method in which image processing is performed using a threshold matrix composed of a plurality of thresholds arranged in a matrix form. With the dithering method using a threshold matrix, the pixel values in the image data and the thresholds in the threshold matrix correspond to each other on a one-by-one basis, and the pixel values are converted into values of fewer gray levels, such as binary values, by comparing the pixel values with the threshold. The Japanese Patent Application Laid-Open No. 2000-261669 discloses a technique for creating an appropriate threshold matrix. A technique disclosed in “Development of High-Image-Quality Binary Error Diffusion Algorithm”, Kazuyoshi Noguchi, Taisuke Akahori, Konica Minolta Technology Report VOL. 2, 2005, p. 73-76 uses an error diffusion method in which an error between a pixel value in the image data and a pixel value after conversion into a fewer gray level value is distributed to neighboring errors.